package com.creator.pangu.biz.controller;

import com.creator.pangu.biz.entity.QrUser;
import com.creator.pangu.biz.service.IQrUserService;
import com.creator.pangu.common.utils.R;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.time.LocalDateTime;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ljj
 * @since 2023-06-20
 */
@RestController
@RequestMapping("/qrUser")
public class QrUserController {

    @Resource
    private IQrUserService qrUserService;

    @PostMapping("/create")
    public R create(QrUser qrUser){
        qrUser.setCreateTime(LocalDateTime.now());
        qrUserService.save(qrUser);
        return R.success();
    }
}
